
#include "s3c2440_soc.h"

int uart0_init(void)
{
	/* 引脚初始化 */

	/* uart寄存器初始化 */
	ULCON0 = 0x3;
	UCON0  = 0x5;
}

int putchar(int c)
{
	while(!(UTRSTAT0 & (1<<2)));
	UTXH0 = (unsigned char)c;
}

int getchar(void)
{
	while(!(UTRSTAT0 & (1<<0)));
	return URXH0;
}

int puts(unsigned char *s)
{
	while(*s)
	{
		putchar(*s);
		s++;
	}
}

